import httpRequest from '@/request'
import appConfig from '@/config/index'

// 账号列表分页
export function bindDeviceList (params: any) {
  return httpRequest({
    url: `${appConfig.api}devicebind/listDevice`,
    method: 'post',
    data: params
  })
}

// 账号列表分页
export function bindUserList (params: any) {
  return httpRequest({
    url: `${appConfig.api}devicebind/listUser`,
    method: 'post',
    data: params
  })
}

// 批量解绑用户、设备
export function unbindBatch (params: any) {
  return httpRequest({
    url: `${appConfig.api}devicebind/delete`,
    method: 'post',
    data: params
  })
}

// 批量绑定用户
export function bindUserBatch (params: any) {
  return httpRequest({
    url: `${appConfig.api}devicebind/createBatchByDevice`,
    method: 'post',
    data: params
  })
}

// 批量绑定设备
export function bindDeviceBatch (params: any) {
  return httpRequest({
    url: `${appConfig.api}devicebind/createBatchByUser`,
    method: 'post',
    data: params
  })
}
